import request from '../utils/Request';

const studentApi={
    selectAll() {
        return request({
            url: '/student/findAll.do',
            method: 'get'
        })
    },
    //分页查询
    selectByPage(params) {   //params对象封装分页参数
        return request({
            url: '/student/selectStudentPage.do',
            method: 'get',
            params
        })
    },
    // 条件查询带分页
    selectByCondition(page,pageSize,searchStudent){
        return request({
            url:'/student/searchStudent.do',
            method:'post',
            params:{
                page,
                pageSize,
            },
            data:searchStudent
        })
    },
    selectAllClass(){
        return request({
            url:'/class/getAllClass.do',
            method:'get',
        })
    },
    addStudent(student){
        return request({
            url:'/student/addStudent.do',
            method:'post',
            data:student
        })
    }
}


export default studentApi
